package me.jiatao.kotlinmall

import androidx.appcompat.app.AppCompatDelegate
import me.jiatao.baselibrary.common.BaseApplication
import me.jiatao.kotlinmall.utils.SettingUtil

class App : BaseApplication() {

    override fun onCreate() {
        super.onCreate()
        initTheme()
    }


    private fun initTheme() {
        if (SettingUtil.getIsNightMode()) {
            AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES)
        } else {
            AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO)
        }
    }
}